import * as fs from 'fs';

/**
 * Env
 */
class Env {
    serPort: string = '';
    secret : string = '' ;
    expiresIn: number = 0 ;
    testUrl:string = '';
    loginUsername:string = '';
    loginPwd:string = '';
    b2bUrl:string = '';
    dbUrl:string = '';
    dbUser:string = '';
    dbPass:string = '';
    dbName:string = '';
    noncestr:string = '';
    logPath: string = '';
}

let env: Env
if (process.env.NODE_ENV == "dev") {
    console.log("开发环境");

    env = require('./dev.json') as Env
} else {
    console.log("生产环境");

    env = require('./prod.json') as Env
}

export default env;